﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.Practices.Composite.Events;
using GalaSoft.MvvmLight.Messaging;


namespace BingVis.SilverlightClient
{
    public class ViewModelBase : INotifyPropertyChanged
    {
        protected static Messenger mediator;

        public ViewModelBase()
        {
            if (mediator == null)                
                mediator = AppMediator.Instance;
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;
        public void OnPropertyChanged(string propName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
        }
        #endregion
    }
}
